<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://ckeditor.com" prefix="ckeditor"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" scope="request"/>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" href="<c:url value='/resources/styles/main.css' />" type="text/css"/>
    <%--<link type="text/css" rel="stylesheet" href="<c:url value='/resources/ckeditor/_samples/sample.css' />" />--%>
    <script type="text/javascript" src="<c:url value='/resources/scripts/datePicker/WdatePicker.js' />"></script>
    <script type="text/javascript" src="<c:url value='/resources/scripts/jquery-1.4.4.min.js' />"></script>


    <script type="text/javascript">
        var contextPath = '${ctx}/';
//        $("#downBtn").click(
                function download() {
//                    alert("ddd");
                window.location.href = contextPath +"/admin/downLoadFile.do?id=${data.id}" ;
                }

//                });
    </script>
    <title>内容维护</title>
</head>
<body>

<table class="pagination" style="padding-left: 70px;">
    <tr>
        <td>

            <a href="<c:url value='/admin/listActRecord.do?cate=${cate}' />">
                <c:if test='${cate=="0"}'>返回活动档案A列表</c:if>
                <c:if test='${cate=="1"}'>返回活动档案B列表</c:if>
            </a>

        </td>
    </tr>
</table>
<form enctype="multipart/form-data" id="addContent" name="addContent" action="<c:url value='/admin/editActRecord.do' />" method="post">

    <%--序号：<input type="text" id="seq" name="seq" value='${data.seq}'/> </br>--%>
    <%--日期：<input type="text" id="activityDay" name="activityDay"  class="Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd ', readOnly:true})" value='${data.activityDay}' /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--%>
    <%--档案名称：<input type="text" id="title" name="title"  value='${data.title}'/> </br>--%>

    <%--选择档案文件:<input type="file" id="fileName" name="fileName" value="上传"></intput>  </br>--%>


            <%--FileUrl--%>

        <%--<input id="fileUrl" name="fileUrl" type="text"--%>
               <%--class="snx-inputtext" value="${data.path }"--%>
               <%--readonly="readonly"/>--%>
						<%--<button type="button" id="downBtn" onclick="download();">下载此文档</button>--%>


    <%--<input name="id" type="hidden" id="id" value="${data.id }" />--%>
    <%--<input name="entryDate" type="hidden" id="entryDate" value="${data.entryDate }" />--%>
    <%--<input name="path" type="hidden" id="path" value="${data.path }" />--%>
    <%--<input name="cate" type="hidden" id="cate" value="${cate}" />--%>
    <%--</br><input type='submit' value="提交" />--%>
        <table class="list">

            <tr>
                <td>序号</td>
                <td>
                    <input type="text" id="seq" name="seq" value='${data.seq}'/>
                </td>
            </tr>
            <tr>
                <td>文件夹</td>
                <td>
                    <select id='folderId' name="folderId">
                        <option value="0">--请选择--</option>
                        <c:forEach var='datas' items="${folders}">
                            <option value=${datas.id} ${data.folderId==datas.id? 'selected':''}>${datas.title}</option>
                        </c:forEach>

                    </select>
                </td>
            </tr>
            <tr>
                <td>日期</td>
                <td>
                    <input type="text" id="activityDay" name="activityDay"  class="Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd ', readOnly:true})" value='${data.activityDay}' />
                </td>
            </tr>
            <tr>
                <td>档案名称</td>
                <td>
                    <input type="text" id="title" name="title"  value='${data.title}'/>
                </td>
            </tr>
            <tr>
                <td>选择档案文件</td>
                <td>
                    <input type="file" id="fileName" name="fileName" value="上传"></intput>  </br>


                    FileUrl

                    <input id="fileUrl" name="fileUrl" type="text"
                    class="snx-inputtext" value="${data.path }"
                    readonly="readonly"/>
                    <button type="button" id="downBtn" onclick="download();">下载此文档</button>
                </td>
            </tr>
            <tr>
                <input name="id" type="hidden" id="id" value="${data.id }" />
                <input name="entryDate" type="hidden" id="entryDate" value="${data.entryDate }" />
                <input name="path" type="hidden" id="path" value="${data.path }" />
                <input name="cate" type="hidden" id="cate" value="${cate}" />
                <td colspan="2"><input type='submit' value="提交" /></td>

            </tr>
        </table>
</form>
</body>
</html>